<!DOCTYPE html>
{% load static %}
<html lang="zh-cn">
<head>
    <script type='text/javascript' src="static/fybjs/htmlAceControlShow.js"></script>
    <script>
        headLoadFile('新一代工业软件应用商店');
    </script>
    <!--付颖斌的js文件-->
    <script type='text/javascript' src="static/fybjs/httpDataTransFyb.js"></script>
    <script>
        $.ajaxSetup({data:{csrfmiddlewaretoken:'{{ csrf_token }}'}})
    </script>
    <link rel="stylesheet" type="text/css" href="static/css/indexModel.css">

</head>
<body class="no-skin">
<!--导航栏index-->
<script>
    //权限控制
    jumpURL=getAuthURL(window.location.href);
    if(jumpURL!=window.location.href){window.location.href=jumpURL;}else{};
    //加载内容
    shortCutText=['平台主页','数据聚合','情景推荐'];
    shortCutText=[];
    shortCutLiColor=['grey','purple','green'];
    shortCutHref=['#','#','https://www.baidu.com'];
    shortCutSrc=['static/ace/assets/images/avatars/platform.png','static/ace/assets/images/avatars/process.png','static/ace/assets/images/avatars/support.png'];
    navBarShowAceIndexFyb("","新一代工业软件应用商店","工业软件库","欢迎光临",shortCutText, shortCutLiColor, shortCutHref, shortCutSrc);

</script>

<div class="main-container ace-save-state" id="main-container">
    <!--嵌入侧边栏-->
    <div class="sidebar responsive ace-save-state" id="sidebar">
        <!-- 功能按钮区域 -->
        <script>
            buttonClass=['btn btn-success','btn btn-info','btn btn-warning','btn btn-danger'];
            dataToggle=['tab','modal','modal','modal'];
            dataTarget=['#projectManagementDiv','#newProjectModal','#helpModal','#dangerModal'];
            buttonID=['','','',''];
            iClass=['ace-icon fa fa-cog','ace-icon fa fa-table','ace-icon fa fa-users','ace-icon fa fa-bell-o'];
            //leftTopNavBarControlButtonAceFyb(buttonClass, dataToggle, dataTarget, buttonID, iClass);
        </script>
        <!-- 侧边栏 -->
        <script>
            menuList=JSON.parse(getUserMenuList());
            menuActiveID=getNavBarMenuActiveId(getHtmlUrlAlone(location.href),menuList[0]['cotentDataHref'], menuList[0]['cotentMenuID'],"@");
            leftContentNavBarAceFyb(menuList[0]['titleData'], menuList[0]['titleiClass'], menuList[0]['titleHref'], menuList[0]['cotentData'], menuList[0]['contentiClass'], menuList[0]['cotentDataHref'],menuActiveID);
        </script>


    </div>
    <div class="main-content">
        <div class="main-content-inner">
            <!--嵌入面包屑-->
            <script>
                var titleBreadData=['新一代工业软件平台','#'];
                var searchString=['show','请输入名称'];
                var otherBreadData=new Array();
                otherBreadData[0]=['工业软件库','#'];
                otherBreadData[1]=['test','#'];
                testID=breadCrumbsAceFyb(titleBreadData,otherBreadData, searchString);
            </script>

            <script>
                //获得分类信息
                var transUrl='dataTransferFybAdmin';//传输数据的URL
                   var transType='POST';
                   var transAsync=false;//表明同步数据传输
                   var columnName=['class_name', 'class_level', 'id'];
                   var transData={
                       table:dbTableHead + 'classify_infor',
                       sqlType:'query',
                       column:matrixTransStringForSqlColumn(columnName),
                       userAccount:userAccount,
                       enterAccount:enterAccount,
                       restraint:'class_level=1 order by class_list_order ASC',
                   };
                queryData=dataTransferFyb(transUrl,transType,transAsync,transData,);
                classifyName='第一级';
                var classifyIDMatrix=[];
                var classifyDetailMatrix=[];
                classifyIDMatrix[0]='0';
                classifyDetailMatrix[0]='全部';
                for(var i=0;i<queryData.length;i++)
                {
                    classifyIDMatrix[i+1]=queryData[i]['id'];
                    classifyDetailMatrix[i+1]=queryData[i]['class_name'];
                }
                classifyShowAceFyb(classifyName, 'classLevel1', classifyIDMatrix, classifyDetailMatrix);
                classifyShowAceFyb('第二级', 'classLevel2', classifyIDMatrix, classifyDetailMatrix);
                classifyShowAceFyb('第三级', 'classLevel3', classifyIDMatrix, classifyDetailMatrix);
                $('#classLevel2').children().remove();//清空第二级分类
                $('#classLevel3').children().remove();//清空第三级分类

                var classFybL1=document.getElementById("classLevel1");//获取表格id为'classLevel1'的表格
                var cfl1 = classFybL1.getElementsByTagName("span");//获取表格中，tagName为button的一行元素
                for(var i=0;i<cfl1.length;i++) {
                    cfl1[i].onclick = function (){
                        var tempClID=$(this).attr('value');
                        setDefaultColorForClassify("classLevel1");//重置一级目录字体颜色
                        $(this).attr('class', 'text-success');//设置点击字体颜色
                        if(tempClID!='0'){//表明点击的不是全部按钮
                            //更改当前选择类别的颜色
                            var transData2={
                               table:dbTableHead + 'classify_infor',
                               sqlType:'query',
                               column:matrixTransStringForSqlColumn(['class_name', 'class_level', 'id']),
                               userAccount:userAccount,
                               enterAccount:enterAccount,
                               restraint:'class_level="2" and class_father_id='+ tempClID +' order by class_list_order ASC',
                            };
                            queryLevelData2=dataTransferFyb('dataTransferFybAdmin','POST',false,transData2,);
                            $('#classLevel2').children().remove();//清空第二级分类
                            $('#classLevel3').children().remove();//清空第三级分类
                            $('#classLevel2').append('<i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</i>');
                            $('#classLevel2').append('<span class="editable editable-click" value="0">全部</span>');
                            if(queryLevelData2[0]['id']!=''){
                                for(var j=0;j<queryLevelData2.length;j++)
                                {
                                    $('#classLevel2').append('<i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</i>');
                                    $('#classLevel2').append('<span class="editable editable-click" value="'+ queryLevelData2[j]['id'] +'">'+ queryLevelData2[j]['class_name'] +'</span>');
                                }
                                var classFybL2=document.getElementById("classLevel2");//获取表格id为'classLevel2'的表格
                                var cfl2 = classFybL2.getElementsByTagName("span");//获取表格中，tagName为button的一行元素

                                for(var k=0;k<cfl2.length;k++){//循环生成第二级目录的点击按钮
                                    cfl2[k].onclick = function (){
                                        var tempClID2=$(this).attr('value');
                                        setDefaultColorForClassify("classLevel2");//重置二级目录字体颜色
                                        $(this).attr('class', 'text-success');//设置点击字体颜色
                                        if(tempClID2!='0'){//表明点击的不是全部按钮
                                            var transData3={
                                               table:dbTableHead+ 'classify_infor',
                                               sqlType:'query',
                                               column:matrixTransStringForSqlColumn(['class_name', 'class_level', 'id']),
                                               userAccount:userAccount,
                                               enterAccount:enterAccount,
                                               restraint:'class_level="3" and class_father_id='+ tempClID2 +' order by class_list_order ASC',
                                            };
                                            queryLevelData3=dataTransferFyb('dataTransferFybAdmin','POST',false,transData3,);
                                            $('#classLevel3').children().remove();//清空第三级分类
                                            $('#classLevel3').append('<i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</i>');
                                            $('#classLevel3').append('<span class="editable editable-click" value="0">全部</span>');
                                            if(queryLevelData3[0]['id']!=''){
                                                for(var m=0;m<queryLevelData3.length;m++)
                                                {
                                                    $('#classLevel3').append('<i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</i>');
                                                    $('#classLevel3').append('<span class="editable editable-click" value="'+ queryLevelData3[m]['id'] +'">'+ queryLevelData3[m]['class_name'] +'</span>');
                                                }
                                                var classFybL3=document.getElementById("classLevel3");//获取表格id为'classLevel3'的表格
                                                var cfl3 = classFybL3.getElementsByTagName("span");//获取表格中，tagName为button的一行元素
                                                for(var n=0;n<cfl3.length;n++){//循环生成第三级目录的点击按钮
                                                    cfl3[n].onclick = function (){//点击事件
                                                        setDefaultColorForClassify("classLevel3");//重置三级目录字体颜色
                                                        $(this).attr('class', 'text-success');//设置点击字体颜色
                                                        var tempClID3=$(this).attr('value');
                                                        //加载第三级分类点击后的分类信息
                                                        alert(tempClID3);
                                                    }
                                                }
                                            }
                                            //加载第二级点击分类后的分类信息
                                            alert(tempClID2);
                                        }else{
                                            $('#classLevel3').children().remove();//清空第三级分类
                                        }
                                    }
                                }
                            }else{}
                        }else{
                            $('#classLevel2').children().remove();//清空第二级分类
                            $('#classLevel3').children().remove();//清空第三级分类
                            //显示所有的分类信息
                        }
                        //alert(tempClID);
                    }
                    //alert(tds[i]);
                }
                function setDefaultColorForClassify(classifyID){
                    var classifyColor=document.getElementById(classifyID);//获取表格id为'classLevel1'的表格
                    var clafcl = classifyColor.getElementsByTagName("span");//获取表格中，tagName为button的一行元素
                    for(var x=0;x<clafcl.length;x++) {
                        $(clafcl[x]).attr('class', 'editable editable-click');
                    }
                }


            </script>

            <div class="page-content">
                <div class="row">
                    <div class="col-sm-6">
                        <div class="tabbable">
                            <ul class="nav nav-tabs" id="myTab">
                                <script type='text/javascript'>
                                    subContentPageAceFyb('所有APP',true,'#');
                                </script>
                            </ul>
                            <div class="tab-content" id="pageContent">
                                <!--开始写入正文-->


                                <!--结束写入正文-->
                                <!--测试-->

                                <!--测试结束-->
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--footer,显示版权信息-->
    <script>
        copyRightAceFyb('长安大学汽车学院物流工程系', 'https://qiche.chd.edu.cn/2020/1208/c8529a173474/page.htm/', '2021');
    </script>

</div>

</body>
</html>